import { TypeOf, object, string } from "zod";

export const commentSchema = object({
  body: object({
    content: string({
      required_error: "Content is required",
    }),
    postId: string({
      required_error: "PostId is required",
    }).uuid("Invalid PostId"),
  }),
});
export const updateCommentSchema = object({
  body: object({
    content: string(),
  }).partial(),
});

export type CommentSchema = TypeOf<typeof commentSchema>["body"];
export type UpdateCommentSchema = TypeOf<typeof updateCommentSchema>["body"];
